/**
 * @Author: 曹钰林
 * @Date: 2019/10/08
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 获取优惠包代码
export const searchCode = params => axios.get(`${SERVER.MEMBERS_CLUB}/management/discounts/searchCode`, { params });

// 分页查询列表
export const searchByPage = params => axios.get(`${SERVER.MEMBERS_CLUB}/management/discounts/searchByPage`, { params });

// 清理停用记录
export const cleanUp = params => axios.post(`${SERVER.MEMBERS_CLUB}/management/discounts/cleanUp`, params);

// 根据主表id和类型查询
export const searchByMainIdAndType = params => axios.get(`${SERVER.MEMBERS_CLUB}/management/discounts/searchByMainIdAndType`, { params });

// 保存或编辑
export const saveOrUpdate = params => axios.post(`${SERVER.MEMBERS_CLUB}/management/discounts/saveOrUpdate`, params);
// 获取维修项目信息
export const queryItem = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/item/findItem`, { params });

// 获取备件信息
export const queryPartListByOrderType = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/partInfos`, { params });
